<script type="text/javascript">
  jQuery(document).ready(function($) {
    $('#cate1').bjqs({
      'height' : 180,
      'width' : 240,
      'responsive' : true,
      'showcontrols' : false
    });
    
    $('#cate9').bjqs({
      'height' : 180,
      'width' : 240,
      'responsive' : true,
      'showcontrols' : false
    });
    
    $('#cate15').bjqs({
      'height' : 180,
      'width' : 240,
      'responsive' : true,
      'showcontrols' : false
    });
    
    $('#cate20').bjqs({
      'height' : 180,
      'width' : 240,
      'responsive' : true,
      'showcontrols' : false
    });
  });
  
  
</script>

<div class="home-row">
  <h3>新闻中心</h3>
  <div id="cate1" class="index-slide">
    <ul class="bjqs">
      <%=generate_slider(@cate1_posts)%>
    </ul>
  </div>

  <ul class="index-posts">
    <%@cate1_posts.each do |p|%>
      <li class="cat-post-item">
        <%=link_to p.title,p,:class=>"textcut24"%>
        <span class="post-date"><%=p.created_at.strftime("%y-%m-%d")%></span>
        <span></span>
      </li>
    <%end%>
  </ul>
</div>

<div class="home-row">
  <h3>学校管理</h3>
  <div id="cate9" class="index-slide">
    <ul class="bjqs">
      <%=generate_slider(@cate9_posts)%>
    </ul>
  </div>

  <ul class="index-posts">
    <%@cate9_posts.each do |p|%>
      <li class="cat-post-item">
        <%=link_to p.title,p,:class=>"textcut24"%>
        <span class="post-date"><%=p.created_at.strftime("%y-%m-%d")%></span>
        <span></span>
      </li>
    <%end%>
  </ul>
</div>


<div class="home-row">
  <h3>党团工作</h3>
  <div id="cate15" class="index-slide">
    <ul class="bjqs">
      <%=generate_slider(@cate15_posts)%>
    </ul>
  </div>

  <ul class="index-posts">
    <%@cate15_posts.each do |p|%>
      <li class="cat-post-item">
        <%=link_to p.title,p,:class=>"textcut24"%>
        <span class="post-date"><%=p.created_at.strftime("%y-%m-%d")%></span>
        <span></span>
      </li>
    <%end%>
  </ul>
</div>

<div class="home-row">
  <h3>教学教研</h3>
  <div id="cate20" class="index-slide">
    <ul class="bjqs">
      <%=generate_slider(@cate20_posts)%>
    </ul>
  </div>

  <ul class="index-posts">
    <%@cate20_posts.each do |p|%>
      <li class="cat-post-item">
        <%=link_to p.title,p,:class=>"textcut24"%>
        <span class="post-date"><%=p.created_at.strftime("%y-%m-%d")%></span>
        <span></span>
      </li>
    <%end%>
  </ul>
</div>